﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxEditors;

public partial class admin_quanlythoiluongct : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        load();
    }
    private void load()
    {
        gv_qlChuongTrinh.DataSource = ChuongTrinh.GetAll();
        gv_qlChuongTrinh.DataBind();
    }
    protected void gv_qlChuongTrinh_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        ASPxLabel mact = (ASPxLabel)gv_qlChuongTrinh.FindEditFormTemplateControl("ASPxLabel1");
        ASPxTextBox thoiluong = (ASPxTextBox)gv_qlChuongTrinh.FindEditFormTemplateControl("ASPxTextBox3");

        ChuongTrinh.CapNhatChuongTrinh(Convert.ToInt32(mact.Text), Convert.ToInt32(thoiluong.Text));
        e.Cancel = true;
        gv_qlChuongTrinh.CancelEdit();
        load();
    }
}